    package com.study.system.common.exception;

    import com.study.system.common.result.IResultCode;
    import lombok.Getter;
//简化业务代码中对于业务异常的处理。定义这样一个异常类

    @Getter
    public class BusinessException extends RuntimeException {
        public IResultCode resultCode;

        public BusinessException(IResultCode errorCode) {
            super(errorCode.getMsg());
            this.resultCode = errorCode;
        }

        public BusinessException(String message){
            super(message);
        }

        public BusinessException(String message, Throwable cause){
            super(message, cause);
        }

        public BusinessException(Throwable cause){
            super(cause);
        }


    }
